#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fp_inv()
{
    sm2_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0xce,0x5c,0xd0,0x50,0x21,0x79,0xed,0x90,0x72,0x3e,0xf1,0x11,0x99,0x0c,0x70,0xfc,0x19,0xd8,0x00,0xe5,0xbc,0x69,0x18,0x51,0x35,0xb2,0xec,0x82,0x57,0x59,0xe8,0xd9};
    static std::uint8_t c0[32] = {0x4e,0x13,0xd0,0x0d,0xf2,0xba,0x24,0x42,0xac,0xa8,0x3c,0x0b,0x07,0xe5,0x1a,0x3a,0x49,0xc9,0x55,0xc9,0x65,0xd5,0x0b,0x45,0xfb,0x10,0x16,0x91,0x91,0x2a,0xae,0x52};
    sm2_fp_from_bytes(a, a0);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a1[32] = {0xc8,0xf7,0x56,0x5d,0x5e,0xd6,0x75,0xf2,0xdd,0x23,0xd4,0x68,0x1c,0xe5,0x8c,0xd5,0xff,0x0a,0x3d,0x58,0xb2,0x45,0x79,0x90,0xeb,0xb4,0x2e,0x5f,0x9f,0x8f,0xba,0x18};
    static std::uint8_t c1[32] = {0x19,0xb0,0x85,0x61,0xe0,0xe0,0x5d,0xe0,0xb2,0xd2,0xe3,0xcc,0x77,0xda,0xc4,0xca,0xd5,0xbb,0x1b,0x10,0xeb,0xfa,0xb2,0x0e,0x8a,0xd6,0xb9,0x5f,0x69,0xb3,0xff,0x03};
    sm2_fp_from_bytes(a, a1);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a2[32] = {0x50,0x56,0x6f,0xdc,0xfd,0xc7,0xf6,0x12,0xf7,0x6c,0x99,0x11,0x69,0xdb,0xee,0x51,0x01,0x22,0xa4,0xe2,0x82,0x06,0x09,0xd9,0xf4,0x5c,0x55,0x18,0xff,0x7e,0x75,0xb1};
    static std::uint8_t c2[32] = {0x4f,0xff,0xf3,0xe8,0xd9,0x88,0x90,0x11,0x00,0x15,0xfe,0x4c,0x28,0x22,0x90,0x98,0xcb,0xee,0x65,0xb0,0xbe,0xc4,0x68,0xbe,0xeb,0xe0,0x9f,0x11,0xae,0x94,0x60,0x6d};
    sm2_fp_from_bytes(a, a2);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a3[32] = {0x39,0x71,0x3b,0xe9,0x51,0x2c,0xcf,0x37,0xa5,0xfa,0xd0,0x2b,0xc9,0xd0,0x6a,0xcc,0x49,0xed,0x34,0x64,0xec,0x29,0x16,0xbd,0xf7,0xf1,0xc7,0xa5,0xe5,0xb0,0xf6,0xad};
    static std::uint8_t c3[32] = {0x9b,0x2b,0xfd,0x5b,0xf5,0x60,0x8d,0x6d,0xbd,0xc4,0xd3,0x50,0x7f,0x74,0xe1,0x1c,0xed,0xde,0xb2,0x42,0x51,0x90,0xe3,0xc7,0x42,0x51,0xca,0x9a,0x3e,0x7d,0xc7,0x3d};
    sm2_fp_from_bytes(a, a3);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a4[32] = {0xa9,0xec,0x7f,0x82,0xdb,0x8e,0xaf,0x50,0xeb,0x98,0xf5,0xca,0x30,0x00,0xc5,0x61,0xd7,0xd8,0xf6,0x5a,0x35,0x3d,0xa3,0x31,0x1a,0xe3,0xc3,0xcc,0x00,0xd3,0xa5,0x03};
    static std::uint8_t c4[32] = {0x0e,0x2e,0xcd,0x16,0xca,0x2b,0xfc,0x44,0x89,0xf5,0x27,0xac,0xb0,0xd0,0x7d,0x57,0x6e,0x91,0x0b,0xd0,0x4d,0x73,0x43,0xe6,0x00,0xdf,0x1f,0x61,0x22,0x29,0x22,0xe2};
    sm2_fp_from_bytes(a, a4);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a5[32] = {0xc0,0xdc,0x67,0x46,0x28,0xc8,0x23,0x92,0x96,0x1a,0xc7,0x97,0x73,0x59,0xaa,0x63,0xad,0x58,0x22,0x4d,0x03,0xe3,0x7c,0x9d,0x55,0xac,0xd5,0x99,0x1c,0x7f,0x17,0x38};
    static std::uint8_t c5[32] = {0x67,0xc8,0x7a,0x30,0x70,0x34,0xc4,0x40,0x3b,0xbd,0xec,0x3c,0x86,0x96,0x70,0x3f,0x69,0x8d,0xe4,0x45,0x48,0xc2,0xc4,0x7b,0x2f,0xe3,0x2c,0x9c,0xfb,0x22,0x57,0x01};
    sm2_fp_from_bytes(a, a5);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a6[32] = {0x24,0xa5,0x4f,0x98,0xe9,0xe7,0x0d,0x84,0x47,0x26,0x3b,0xef,0x80,0xd4,0x02,0xc3,0x45,0x6f,0x8e,0x4c,0x20,0xf2,0x39,0x12,0x32,0xd7,0xb3,0x3b,0x98,0x75,0x1c,0x63};
    static std::uint8_t c6[32] = {0xfd,0xf8,0x72,0x38,0x71,0x29,0x8b,0x43,0x03,0x6c,0xe4,0x1c,0x76,0xe8,0xa5,0x5f,0xba,0x1e,0xed,0xf0,0x98,0x28,0xbc,0x7e,0xe6,0x74,0xb8,0x7d,0x7a,0x4b,0x73,0x0a};
    sm2_fp_from_bytes(a, a6);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a7[32] = {0xee,0xc5,0xb5,0xb9,0x1e,0x86,0xca,0x27,0x41,0x98,0xea,0x60,0x1d,0x68,0x11,0xd9,0xa7,0xa5,0x38,0xae,0x45,0x18,0x23,0xee,0x04,0xc8,0x68,0xc1,0xfa,0x64,0xe7,0x9e};
    static std::uint8_t c7[32] = {0x4b,0x5d,0xd8,0x5f,0x55,0xf7,0xc2,0x72,0xc3,0x99,0x69,0x57,0x93,0x2d,0xcf,0xcc,0xec,0x99,0xa2,0x91,0xc7,0x83,0xec,0xa4,0x07,0x02,0x34,0xfb,0x0c,0x9b,0xfd,0x7d};
    sm2_fp_from_bytes(a, a7);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a8[32] = {0x25,0x9c,0xcd,0x42,0xce,0xbc,0x75,0xa7,0x60,0x2e,0x17,0x70,0x2f,0x51,0xee,0xed,0xa0,0xa2,0xaf,0x18,0x5c,0xe3,0x4f,0x7e,0x7f,0x24,0x67,0xa0,0x02,0x88,0x98,0x95};
    static std::uint8_t c8[32] = {0xb8,0x14,0xec,0x7b,0xf1,0x27,0xcc,0xea,0x10,0x99,0xf4,0x31,0x9e,0x01,0xb5,0x30,0xdd,0x31,0xe0,0x71,0xda,0x78,0xc7,0xbf,0x60,0xb4,0xc4,0x9e,0xe1,0xe4,0x36,0xe3};
    sm2_fp_from_bytes(a, a8);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a9[32] = {0x28,0x20,0x96,0x21,0x8c,0x2d,0x34,0x6e,0xed,0x35,0x30,0x32,0xe0,0xe3,0x27,0x14,0xed,0xbd,0xe8,0x4e,0xb7,0x73,0xaa,0x86,0xb4,0xb4,0x43,0x32,0x47,0x26,0x03,0x73};
    static std::uint8_t c9[32] = {0x21,0x97,0x35,0x00,0x0c,0x8c,0xb0,0x05,0x11,0xef,0xbc,0xfa,0xc0,0x84,0xf6,0xa7,0xd2,0x1b,0x5a,0xa6,0xdd,0x06,0x9a,0xbb,0x38,0x0f,0x01,0x33,0x07,0x01,0x97,0x3b};
    sm2_fp_from_bytes(a, a9);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a10[32] = {0xa4,0x33,0xba,0xca,0x56,0xaa,0x9c,0x48,0x25,0x1e,0x15,0x54,0x69,0x64,0x20,0xd8,0xe7,0xf9,0x35,0xff,0x56,0x81,0xf6,0x37,0xec,0x8a,0xb9,0x36,0x92,0x43,0x39,0x6b};
    static std::uint8_t c10[32] = {0x53,0xb8,0xfa,0xf4,0x84,0xde,0x77,0xc0,0x99,0xd5,0xaa,0x08,0x68,0xd8,0xff,0xcf,0xa8,0x3e,0xfd,0xac,0x09,0xcd,0x82,0x80,0x47,0xb9,0x2a,0x96,0x92,0x41,0x4e,0x39};
    sm2_fp_from_bytes(a, a10);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a11[32] = {0x18,0xd5,0xfe,0xf1,0x0b,0x5a,0x1b,0xf6,0x08,0x05,0x20,0xd9,0x40,0x5e,0xdc,0x79,0x1b,0xb0,0x1f,0x5e,0x4a,0x35,0x9c,0xbf,0x87,0x26,0x10,0x10,0x12,0x3b,0xf9,0x2f};
    static std::uint8_t c11[32] = {0x48,0x50,0xbd,0x26,0xd9,0x53,0x81,0xfb,0xd9,0x98,0x62,0xa2,0x1d,0xe3,0x99,0xae,0x52,0x1c,0x8a,0x37,0x86,0xa3,0xbe,0x20,0xdf,0x9f,0xc5,0x82,0x5f,0x29,0xab,0x7a};
    sm2_fp_from_bytes(a, a11);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a12[32] = {0xb9,0x9b,0xc4,0x4f,0xca,0xe2,0x2c,0x9f,0x21,0x7b,0x4a,0x6e,0x53,0x00,0x6f,0x18,0x9c,0x68,0x04,0x17,0x6e,0x98,0x1b,0xed,0x08,0x66,0x65,0x8b,0xcb,0x80,0x83,0xc2};
    static std::uint8_t c12[32] = {0xb7,0xdd,0x00,0x3d,0x47,0x24,0x7d,0x3b,0xb7,0xcc,0xdd,0xd2,0x2e,0xb2,0xc2,0xc0,0x56,0x3a,0x9f,0xa0,0x6c,0xf5,0x89,0x09,0x0a,0x35,0x81,0xf0,0x9b,0xf4,0xa6,0xed};
    sm2_fp_from_bytes(a, a12);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a13[32] = {0x3e,0x43,0xf5,0x9b,0x64,0x00,0x34,0x70,0x93,0xfa,0x1a,0xda,0x68,0xfe,0xd6,0x77,0xaf,0x01,0xde,0xbd,0xc8,0x38,0x03,0x7d,0x2f,0x99,0x4f,0x2d,0xb5,0x42,0x3c,0x13};
    static std::uint8_t c13[32] = {0x52,0x0d,0x2a,0x3a,0x32,0xab,0x09,0x80,0x99,0xda,0x05,0x0b,0xc5,0x77,0xe8,0xdd,0x91,0xb6,0xf3,0xab,0x7b,0x17,0xfc,0x27,0xd4,0x74,0x0f,0xa1,0x99,0xe7,0xf5,0x0f};
    sm2_fp_from_bytes(a, a13);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a14[32] = {0xd4,0x27,0xf9,0x48,0xa7,0xaf,0x62,0xd9,0x72,0x9d,0x6f,0xd4,0x2a,0x0c,0xee,0x15,0xc2,0x27,0x31,0x57,0x46,0x8c,0x8f,0xd4,0x79,0x2a,0x9f,0x61,0xea,0x79,0x87,0x49};
    static std::uint8_t c14[32] = {0xd1,0x1c,0x2b,0x8b,0x42,0x3c,0xa6,0x91,0xbf,0xad,0xc6,0x70,0xc5,0x61,0xe1,0x34,0xf6,0x93,0xfc,0x89,0xf1,0x7b,0x14,0xd0,0x60,0x49,0xeb,0x5d,0x57,0xf0,0xbc,0x3a};
    sm2_fp_from_bytes(a, a14);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a15[32] = {0xee,0xb9,0xb3,0x6b,0x22,0xf5,0xb8,0x04,0x62,0x53,0xbe,0x58,0x0a,0x66,0xa6,0x03,0xf3,0x3c,0x53,0x2b,0xc5,0x3e,0xfa,0xb8,0x00,0x0d,0x03,0xf2,0x2e,0x98,0xa6,0x11};
    static std::uint8_t c15[32] = {0x9d,0x33,0xe6,0xc1,0xde,0xc7,0xcc,0x87,0x1e,0xc8,0x6e,0x94,0xb4,0xed,0xbd,0xbc,0x78,0xe5,0x07,0xe7,0x67,0x93,0x55,0xd9,0x49,0x54,0xd0,0x29,0x1c,0x5a,0x2c,0xbe};
    sm2_fp_from_bytes(a, a15);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a16[32] = {0x42,0xd9,0xbe,0x0f,0x6b,0xd0,0x43,0xcd,0xbe,0x5f,0x5c,0x68,0x36,0xf7,0xf0,0x74,0x4e,0xed,0x11,0x15,0xa5,0x13,0x9f,0x98,0xdc,0x80,0x26,0x86,0xd6,0xf6,0x32,0x3e};
    static std::uint8_t c16[32] = {0x5a,0x70,0x94,0x46,0x46,0xd7,0xc8,0xba,0x0e,0xd4,0xd0,0xa5,0xc3,0x5e,0x31,0x42,0x79,0xcd,0xe1,0x52,0x16,0x1d,0x14,0x58,0x50,0xa0,0xb5,0xa6,0x60,0x07,0x47,0x7f};
    sm2_fp_from_bytes(a, a16);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a17[32] = {0xe9,0xda,0x10,0x38,0xb6,0xdb,0xa9,0x86,0x20,0xdd,0xdc,0x40,0x43,0xd2,0xfc,0x35,0x27,0xcd,0x67,0xe8,0x41,0xce,0x03,0x25,0xe8,0x96,0xce,0xc6,0xdc,0xb0,0x4e,0xd9};
    static std::uint8_t c17[32] = {0x1d,0x1f,0xd2,0xf0,0x72,0x46,0xb0,0x04,0x24,0x57,0x0f,0x19,0x2d,0x14,0x7c,0xfc,0x86,0xc3,0x2d,0xdb,0xe3,0x65,0x18,0x5b,0xdb,0x87,0x81,0xa2,0x9b,0xcc,0x1e,0x43};
    sm2_fp_from_bytes(a, a17);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a18[32] = {0x7f,0x10,0x9a,0x30,0x26,0xce,0xf7,0xe2,0xf2,0xdf,0xac,0xf5,0x51,0x7f,0x78,0xb5,0xf9,0xf3,0x1e,0x6a,0x83,0x34,0x84,0x91,0x08,0x75,0xce,0xc1,0x2a,0x94,0xd1,0xf0};
    static std::uint8_t c18[32] = {0x92,0xc8,0x95,0xeb,0xe4,0x73,0x3e,0x49,0x00,0xd7,0xad,0x7f,0x24,0x8d,0x69,0xb1,0x43,0x35,0x3a,0x52,0x9e,0xfa,0x30,0x3c,0x61,0x47,0xbc,0xb7,0x54,0x51,0x64,0x50};
    sm2_fp_from_bytes(a, a18);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a19[32] = {0xd5,0xbc,0x48,0x23,0xf9,0x78,0x5d,0x54,0xcf,0x0e,0xfa,0x7e,0x15,0x58,0x74,0x42,0x36,0x74,0x14,0xf9,0x5b,0x55,0x45,0xe8,0x65,0x03,0xbe,0x42,0x4d,0xa3,0x41,0x4f};
    static std::uint8_t c19[32] = {0x1a,0xd8,0x08,0xaf,0x06,0x97,0x11,0xa5,0x3b,0x08,0xbf,0xd6,0x5f,0xe1,0x0f,0x4e,0x22,0x10,0x29,0xac,0x13,0x8d,0x9c,0x2f,0xc6,0xf4,0xfc,0x5a,0x1b,0xe9,0xb0,0x96};
    sm2_fp_from_bytes(a, a19);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a20[32] = {0xf4,0xab,0xd8,0xf2,0xb3,0x80,0xbb,0x54,0x76,0xb7,0x75,0x02,0x40,0x6b,0x1c,0x96,0x63,0x47,0x06,0xab,0xca,0x2f,0xa6,0xe1,0x46,0x59,0xcb,0xc8,0x76,0x1f,0x05,0x97};
    static std::uint8_t c20[32] = {0x91,0x9d,0x71,0xb6,0x80,0xe3,0x14,0xd3,0x12,0xbc,0x4d,0x3e,0x16,0xf4,0x07,0x1e,0x3c,0x39,0x00,0xe6,0x45,0x47,0xa9,0x4e,0xb6,0x5b,0x81,0xeb,0xbd,0x4a,0x03,0x28};
    sm2_fp_from_bytes(a, a20);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a21[32] = {0xd8,0xfd,0x2a,0xe4,0x4c,0x82,0x7d,0x25,0x55,0xf8,0x08,0x60,0x0d,0xf9,0xd1,0xb0,0xd6,0x53,0x6d,0xd8,0xe1,0x26,0x4a,0xb2,0x7c,0x6d,0x37,0xca,0x1c,0x70,0xba,0xd7};
    static std::uint8_t c21[32] = {0xed,0x23,0x27,0xd0,0x72,0xda,0x61,0xb2,0xd5,0x8c,0x2a,0x25,0x89,0xd1,0x91,0xbb,0x99,0x50,0x1e,0xcf,0x56,0xf7,0xc0,0x23,0xdb,0x9e,0x41,0x2c,0x4e,0xd8,0x66,0x72};
    sm2_fp_from_bytes(a, a21);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a22[32] = {0xbb,0x06,0x17,0x1b,0xdf,0x9f,0x7d,0xb8,0x2d,0x25,0x95,0x52,0x2c,0xa2,0x34,0xc6,0x01,0x88,0x78,0x29,0x79,0xe7,0x4a,0xe6,0x27,0x9a,0xfe,0x41,0x62,0xa1,0x29,0x56};
    static std::uint8_t c22[32] = {0x91,0x4d,0xa8,0xe2,0xc6,0x0a,0x59,0x65,0x2e,0x59,0x4c,0xd6,0x90,0x7b,0x0c,0x9e,0xd2,0xcc,0x06,0xc4,0x2a,0x3f,0x91,0x04,0x97,0x1a,0xce,0xd0,0x39,0xc8,0x01,0xa3};
    sm2_fp_from_bytes(a, a22);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a23[32] = {0x3e,0x3b,0x0a,0xe0,0x29,0x5b,0x85,0xa7,0xcd,0x08,0xa8,0xad,0x56,0x55,0x7c,0x1a,0x5f,0xd5,0xd6,0x35,0x81,0xfb,0x5f,0xf4,0x01,0x9a,0x51,0xfa,0x8e,0xe0,0x4a,0xea};
    static std::uint8_t c23[32] = {0x0e,0xe3,0xc8,0x15,0x50,0x8c,0x19,0xc3,0x4b,0x54,0xee,0x0a,0xd7,0x25,0xb8,0x7b,0x24,0xf1,0xd7,0xfa,0xac,0xb0,0x77,0xed,0xd4,0x9f,0xd0,0x5c,0xb4,0xab,0x56,0x3a};
    sm2_fp_from_bytes(a, a23);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a24[32] = {0x09,0x3f,0xc3,0xca,0x47,0xe4,0x13,0x17,0xd3,0x7a,0x82,0x4f,0x5e,0x18,0xac,0x89,0x01,0xa0,0x45,0xdb,0x33,0x90,0xa8,0xa8,0x5e,0x96,0x50,0xf7,0x97,0x9b,0x1c,0xcb};
    static std::uint8_t c24[32] = {0x84,0xe4,0x54,0x50,0x6f,0x94,0x2c,0x36,0x26,0xd1,0xe4,0x37,0x86,0x51,0x16,0x7f,0x51,0x53,0x4f,0x61,0x21,0xa6,0x42,0x45,0x6b,0x92,0x90,0xec,0xe2,0xa0,0x8a,0x36};
    sm2_fp_from_bytes(a, a24);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a25[32] = {0xb1,0x39,0x9c,0xf4,0x23,0xa9,0xbb,0x51,0xd3,0xb2,0xfd,0xb3,0x6b,0x62,0xc8,0xdf,0x78,0x21,0x80,0xdc,0x0c,0xb5,0x14,0x92,0xea,0xa2,0x4a,0xd7,0x66,0x2c,0x6a,0x49};
    static std::uint8_t c25[32] = {0x7a,0x17,0x40,0xb2,0xd9,0x11,0x48,0x9f,0xee,0x41,0x4f,0x28,0x3e,0x98,0x8d,0xdb,0xc3,0x89,0x5f,0x5d,0xb6,0x1f,0xd2,0x4a,0xc2,0x78,0x37,0xce,0xfe,0x11,0x74,0x08};
    sm2_fp_from_bytes(a, a25);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a26[32] = {0xad,0x28,0x5f,0xfe,0x7a,0x2d,0x53,0x0d,0x53,0xf5,0x11,0xc3,0xf9,0x84,0xda,0x76,0x4a,0xa7,0x0e,0xee,0x7e,0xf6,0x03,0xf6,0xcc,0x9b,0x53,0xe4,0xf4,0xf7,0x90,0x2c};
    static std::uint8_t c26[32] = {0x2b,0xbd,0x5b,0xe1,0x58,0x39,0x8e,0x37,0x1a,0x08,0x5a,0x5e,0x5c,0x1c,0xea,0xc5,0xa6,0x24,0xc0,0xf3,0xd2,0x2a,0x70,0xc1,0x9e,0xf7,0x7e,0x8e,0x08,0x1e,0x54,0x1a};
    sm2_fp_from_bytes(a, a26);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a27[32] = {0x45,0x28,0x1f,0x1b,0x05,0x0a,0xf5,0x13,0xe0,0x44,0xb2,0x9d,0x4e,0x4a,0x8a,0x0c,0xff,0xea,0xcb,0x15,0x61,0x20,0xef,0x8d,0xf9,0x05,0xdb,0x7f,0xe1,0x63,0x08,0x79};
    static std::uint8_t c27[32] = {0x5a,0x9a,0x26,0x6d,0x6e,0x21,0x67,0x8b,0x6a,0xf8,0xd7,0xb5,0x00,0xed,0x4f,0x00,0x44,0xd8,0x56,0x22,0xcc,0x9c,0xa7,0xd7,0x8e,0x40,0x33,0x37,0xa6,0xe1,0xc0,0x84};
    sm2_fp_from_bytes(a, a27);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a28[32] = {0x44,0xef,0x2b,0x9f,0x69,0xeb,0x73,0x16,0x3f,0xe4,0x6e,0x6c,0x91,0x9d,0x81,0xd3,0x89,0x49,0x59,0xb0,0x81,0xcb,0xed,0x60,0x2e,0x6d,0x2e,0x25,0x42,0x99,0xa2,0x3e};
    static std::uint8_t c28[32] = {0x7b,0x8f,0xce,0x36,0x77,0xad,0xb2,0x39,0x4b,0x2b,0xf2,0x5a,0x64,0xd8,0x8a,0x56,0x11,0x8c,0xc3,0x55,0xc0,0xca,0xe2,0xc8,0xa4,0x87,0xed,0x43,0x1b,0xa5,0xd7,0x33};
    sm2_fp_from_bytes(a, a28);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a29[32] = {0x7a,0xf5,0xe8,0x5b,0x36,0xc8,0xbb,0x32,0x18,0xd1,0x92,0x35,0x5e,0x0e,0x02,0x29,0x9d,0x70,0xb4,0xa2,0x4a,0x54,0x39,0x50,0xde,0x61,0x62,0xae,0xd7,0x64,0x14,0x01};
    static std::uint8_t c29[32] = {0x45,0x36,0x55,0x86,0x03,0x2d,0x22,0x77,0xf2,0x2a,0x02,0xd1,0x93,0xcf,0xe7,0x16,0x0a,0xd8,0x29,0x94,0xf0,0x73,0x16,0xd2,0x3c,0x12,0xfd,0x23,0x3a,0x3d,0xad,0xd2};
    sm2_fp_from_bytes(a, a29);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a30[32] = {0x39,0x2b,0xc4,0x0f,0x91,0x29,0x18,0x87,0x62,0xb9,0x9a,0x8e,0xa5,0x05,0x1b,0x35,0x46,0xf2,0x05,0x9b,0x43,0xd9,0x98,0x7c,0x79,0x72,0x8b,0xce,0x01,0x26,0xfc,0x7f};
    static std::uint8_t c30[32] = {0xf8,0x2a,0x7d,0xb2,0x4d,0x68,0xdb,0x09,0xcc,0xbb,0x26,0x4d,0xbb,0x01,0x49,0x46,0x74,0xdc,0x4c,0x3b,0x9e,0x17,0xcb,0x68,0x64,0x68,0x93,0x0a,0xc8,0x19,0xce,0xcb};
    sm2_fp_from_bytes(a, a30);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a31[32] = {0xb5,0xbf,0x8b,0xd2,0xf4,0xfd,0x26,0x17,0xf9,0x4b,0xd9,0xc1,0xe0,0xc5,0x77,0x98,0xfa,0x82,0x11,0x85,0x34,0x29,0xbf,0x10,0x14,0xa4,0x88,0x1f,0x27,0x54,0x83,0x6a};
    static std::uint8_t c31[32] = {0x21,0x58,0xec,0xce,0x6b,0x69,0x80,0xfb,0xe0,0x45,0x52,0x37,0x7a,0xa4,0x41,0xe3,0x14,0x72,0xcd,0x35,0x20,0xed,0x20,0xe5,0x26,0x4c,0x0b,0x84,0x78,0x74,0x08,0xd9};
    sm2_fp_from_bytes(a, a31);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a32[32] = {0x21,0xde,0x8f,0x7c,0xe2,0xb2,0xef,0x16,0xd6,0x51,0x14,0x40,0x32,0xa4,0xfe,0x04,0x27,0x0d,0x19,0xf4,0x8a,0x39,0xaf,0x06,0x3f,0x04,0xab,0x47,0xbe,0xfe,0x04,0xd8};
    static std::uint8_t c32[32] = {0x41,0x58,0xa9,0x98,0x9b,0xf9,0xe4,0x41,0x6b,0x37,0xeb,0x35,0x5b,0x1b,0x7e,0x2c,0x8b,0xaa,0x34,0x8b,0x22,0x9c,0x9c,0xf6,0xaa,0x59,0x85,0x36,0xac,0x76,0x67,0x11};
    sm2_fp_from_bytes(a, a32);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a33[32] = {0xd5,0x04,0x56,0x6c,0x2a,0xa1,0x62,0x3a,0xdb,0xe8,0xea,0xc6,0x9b,0x76,0x68,0x04,0x0f,0x85,0xae,0x00,0x4c,0xa8,0xfb,0x41,0x00,0xf9,0x2d,0xfc,0x81,0xf6,0x89,0x8f};
    static std::uint8_t c33[32] = {0xa6,0x7c,0x23,0x56,0xdf,0x2c,0x48,0x58,0x19,0xeb,0xa8,0x7c,0xf1,0x9c,0xa4,0xd0,0x4f,0xa8,0x49,0x8e,0xed,0xe4,0xd9,0x19,0x23,0x3f,0xfc,0x56,0xc8,0x06,0x60,0x35};
    sm2_fp_from_bytes(a, a33);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a34[32] = {0xc6,0xc8,0x74,0x8a,0x1e,0x32,0x51,0xd7,0xcb,0x8e,0x46,0x07,0x3f,0xdc,0x3d,0xbd,0x61,0x16,0x21,0xcf,0x5d,0x6c,0xe2,0x67,0x60,0xdf,0x0b,0xbf,0x16,0xb5,0xab,0x8c};
    static std::uint8_t c34[32] = {0x94,0xb3,0x7e,0xcb,0x63,0x7b,0x33,0xa0,0xed,0xc3,0x0f,0x7e,0x99,0xfc,0xdb,0x77,0xaf,0x63,0x09,0xe4,0x1d,0xde,0x80,0xae,0x07,0xa3,0x2f,0xd9,0xf5,0x13,0x7c,0x6a};
    sm2_fp_from_bytes(a, a34);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a35[32] = {0x11,0x47,0xfc,0x1d,0x4e,0xab,0xfd,0xf5,0xae,0xcc,0xaf,0xf9,0xec,0x76,0xe7,0x6f,0x41,0x57,0x7c,0xfa,0x29,0xee,0xd6,0x51,0xce,0xd8,0x92,0x40,0xcb,0x25,0xd9,0x6e};
    static std::uint8_t c35[32] = {0x11,0x77,0xbd,0x56,0x83,0xc4,0xfd,0xa9,0x3d,0xb0,0xa6,0x4f,0x7a,0x3d,0x5b,0xfc,0x87,0x09,0xf4,0xaf,0x3c,0x25,0xe0,0xf4,0x94,0xe8,0xb9,0x2d,0x2b,0x03,0x6d,0x36};
    sm2_fp_from_bytes(a, a35);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a36[32] = {0xc8,0xb8,0xfc,0xfc,0xaa,0xe3,0x6f,0xc0,0x27,0xc8,0x48,0x09,0x59,0xb0,0xad,0x32,0xc1,0xb1,0x5e,0x20,0x9b,0xbc,0x12,0xea,0xe9,0xcb,0xb2,0x93,0x3c,0xa9,0x68,0xfd};
    static std::uint8_t c36[32] = {0xeb,0xe3,0x01,0xd6,0x41,0xfd,0xbc,0x7c,0xcc,0xf0,0x1c,0x6d,0x66,0x0d,0xdc,0xbd,0x84,0xbb,0x98,0x76,0x93,0x6f,0x33,0x6f,0x47,0x2c,0xe5,0x1f,0x9e,0xc8,0xbf,0x29};
    sm2_fp_from_bytes(a, a36);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a37[32] = {0xbd,0x5a,0xc8,0x9f,0x49,0xa6,0xe8,0xdf,0xc2,0x89,0x01,0xdc,0xb7,0x9c,0x46,0x9f,0x34,0x3f,0x37,0x70,0xf7,0x2f,0x3c,0xa3,0xa0,0xdf,0x52,0x47,0x25,0xb0,0xab,0xaf};
    static std::uint8_t c37[32] = {0x19,0xdc,0xe4,0x27,0xb5,0xc5,0x51,0x1c,0x3b,0xc3,0x77,0x3f,0x8c,0xa3,0x3e,0xa8,0x10,0x17,0x31,0x90,0xc8,0x3e,0xaf,0xe6,0x90,0x73,0x9b,0xf6,0x03,0x6c,0xaf,0xc5};
    sm2_fp_from_bytes(a, a37);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a38[32] = {0x05,0x83,0x12,0x4c,0xc2,0x41,0xa2,0xa3,0x10,0x95,0x4a,0xd5,0x84,0x29,0x8c,0x71,0xd4,0x2f,0xe7,0x6c,0x50,0x8e,0xc1,0x53,0xc2,0x92,0x5f,0x15,0x75,0x56,0x70,0xbb};
    static std::uint8_t c38[32] = {0x0c,0xce,0x7d,0x56,0x21,0xfb,0x7f,0xf9,0xde,0x2f,0x8e,0x47,0x64,0x96,0x7b,0x8d,0x70,0x0b,0x2f,0x42,0x26,0x9a,0x0e,0x10,0x8c,0x70,0xc3,0x98,0xe7,0x52,0x4b,0x24};
    sm2_fp_from_bytes(a, a38);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a39[32] = {0xfe,0x72,0x66,0x65,0x9e,0xea,0x82,0xfe,0xf3,0xcb,0xf5,0x0b,0x34,0x92,0x74,0x5d,0xa7,0x4a,0x38,0xad,0x2c,0x5c,0xff,0xfa,0xcf,0x8d,0x8b,0x23,0x02,0x7c,0x7c,0xa7};
    static std::uint8_t c39[32] = {0x63,0x95,0x3a,0x53,0xe7,0x40,0xe9,0x56,0x22,0xb1,0xc8,0xeb,0xc9,0x44,0x81,0xda,0x2a,0x27,0x82,0xa7,0x06,0x48,0xb5,0x93,0xf8,0x15,0x47,0x57,0xb1,0x85,0xa4,0x24};
    sm2_fp_from_bytes(a, a39);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a40[32] = {0x3d,0xe0,0x5d,0x3f,0x81,0x53,0x95,0x21,0x8d,0xd4,0xcc,0xff,0x37,0x36,0xca,0xd7,0xef,0x8a,0x01,0xec,0xc1,0xa8,0xb9,0xe8,0xa0,0xc2,0x36,0xb9,0xf8,0x5b,0x21,0x70};
    static std::uint8_t c40[32] = {0xf0,0x88,0xbf,0xdf,0xe7,0x6a,0xa1,0x14,0x79,0x83,0xd7,0xf1,0xb9,0x1d,0x56,0x72,0x8a,0x7f,0x81,0x16,0xaa,0x36,0xd4,0xc4,0x32,0xb1,0x48,0xac,0xb5,0x60,0xc3,0x7c};
    sm2_fp_from_bytes(a, a40);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a41[32] = {0x8e,0x54,0x92,0xc7,0x8c,0xa6,0x47,0xd8,0x65,0x2c,0xe3,0xab,0x30,0x1f,0xea,0xe8,0xac,0xe2,0x8e,0xef,0x16,0xd5,0xfb,0x7e,0x4d,0x4b,0x97,0x0e,0x76,0x5e,0xf1,0x53};
    static std::uint8_t c41[32] = {0x35,0xde,0xa0,0x0c,0x6a,0xa4,0xc9,0x1c,0x93,0x39,0x3f,0x9e,0x67,0x25,0xa9,0xd5,0xf7,0xc5,0xd7,0xfe,0x65,0x31,0x07,0x28,0x63,0x8a,0x62,0x56,0xe9,0xa0,0xe0,0xb4};
    sm2_fp_from_bytes(a, a41);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a42[32] = {0xca,0xa5,0xdf,0xe3,0x37,0x9f,0xed,0x9a,0x68,0x8a,0x1f,0x14,0x71,0x2b,0xcf,0x06,0x20,0x57,0x91,0xcd,0xb5,0xfa,0x12,0xc4,0xe0,0xb7,0x31,0xec,0x3a,0x27,0x56,0x54};
    static std::uint8_t c42[32] = {0x38,0xdf,0x7c,0x12,0x48,0xda,0x43,0x0e,0x1d,0xcc,0xcd,0xc6,0x55,0x67,0x5a,0x52,0x91,0x0e,0xaa,0xd6,0xc0,0x5c,0x3a,0xda,0xec,0x76,0x43,0x65,0x7b,0x7d,0x09,0x8f};
    sm2_fp_from_bytes(a, a42);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a43[32] = {0xb5,0x9e,0xa7,0xe2,0x4d,0xc8,0x76,0xae,0xa8,0x8a,0x8f,0x96,0x2b,0xe3,0xbd,0x31,0xb8,0x59,0xbd,0x9b,0x71,0x50,0x8a,0x5d,0x31,0x67,0xd5,0x92,0xfe,0x6e,0x87,0xaa};
    static std::uint8_t c43[32] = {0x9b,0x95,0xa8,0xbd,0x05,0x69,0x37,0x72,0xcc,0x86,0xdb,0xdd,0x87,0x22,0x3c,0xaf,0xb3,0x1f,0xde,0xe0,0xa2,0xcc,0xfe,0xcf,0x2f,0xf6,0xc2,0x40,0x53,0x25,0x2a,0xb3};
    sm2_fp_from_bytes(a, a43);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a44[32] = {0x4a,0x92,0xc0,0xab,0x2c,0x4c,0x11,0x04,0x81,0x91,0xc7,0x2b,0x0a,0x64,0x49,0x09,0x5c,0x96,0x5b,0x81,0x63,0x16,0xb1,0x4c,0x59,0x1b,0xfa,0xf4,0x86,0xcf,0x9d,0x9a};
    static std::uint8_t c44[32] = {0x9c,0xab,0xb3,0x20,0xb7,0x3d,0x51,0x99,0x7b,0xae,0xf3,0x62,0x15,0x0c,0x43,0x53,0xf2,0xdf,0x5b,0xeb,0xba,0xe6,0x46,0xf3,0x1e,0x96,0xc2,0x2f,0xde,0x8f,0xdc,0x28};
    sm2_fp_from_bytes(a, a44);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a45[32] = {0x6b,0x8c,0xc9,0x79,0x57,0xa9,0x29,0x19,0xe6,0x94,0x8a,0x27,0x04,0x79,0x58,0x5d,0xa9,0x1a,0xeb,0x1d,0xb3,0x6c,0xe8,0xbc,0xef,0xd0,0xbc,0x5e,0x7e,0x6e,0x81,0x8d};
    static std::uint8_t c45[32] = {0x65,0xb0,0x56,0xaf,0xf3,0x2c,0xaa,0x3b,0x80,0x66,0x9b,0x7d,0x64,0x95,0xe9,0x1b,0xdb,0xcb,0x4c,0x34,0x1b,0x6c,0x68,0x86,0x59,0xdc,0x2c,0xcb,0xc1,0x8e,0x3e,0x0a};
    sm2_fp_from_bytes(a, a45);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a46[32] = {0x18,0xc1,0x63,0x96,0xfb,0xeb,0x4d,0xaf,0xa0,0x2e,0xac,0x3c,0x98,0x34,0x62,0xf4,0xce,0x9f,0xc8,0x12,0x50,0x07,0x95,0x36,0x70,0x47,0x63,0x81,0xac,0xd5,0xfa,0x4d};
    static std::uint8_t c46[32] = {0x8c,0x2e,0x9c,0x20,0xd4,0xbc,0x18,0xd8,0xe3,0x12,0x6e,0x40,0x74,0xc9,0xc0,0x9f,0x24,0x2d,0xc7,0x91,0x3c,0xda,0xbd,0xa8,0xe0,0xaf,0x47,0x98,0x86,0x01,0x8f,0xeb};
    sm2_fp_from_bytes(a, a46);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a47[32] = {0x65,0x79,0x95,0x7f,0xa1,0x73,0xe5,0xcb,0xdb,0xa8,0x93,0x37,0xe2,0x6a,0xdf,0x5b,0x3c,0x03,0x54,0x39,0x38,0x4c,0x24,0xad,0x9a,0x14,0x94,0xf5,0x46,0x54,0x5c,0x75};
    static std::uint8_t c47[32] = {0xca,0x69,0x4d,0x50,0xf9,0xa0,0xea,0x40,0xbf,0x26,0xd1,0xb0,0xb4,0xe2,0x10,0xfc,0x22,0xa9,0x58,0x39,0x7a,0xf7,0x76,0x1a,0xf9,0xfc,0x52,0x2c,0x93,0x90,0x3e,0xfc};
    sm2_fp_from_bytes(a, a47);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a48[32] = {0x9c,0xd6,0x99,0x40,0xd6,0x18,0xcd,0xa2,0x59,0x47,0xfc,0xa5,0x6f,0xdf,0xe4,0xc0,0x05,0x39,0xa8,0x53,0x9c,0x1f,0xc7,0xd0,0x1a,0x78,0x54,0x14,0x50,0x11,0xd5,0xee};
    static std::uint8_t c48[32] = {0x21,0x1c,0xc1,0x7b,0x02,0x48,0x5d,0xd3,0x68,0x97,0xfd,0x2a,0x64,0xd6,0x38,0x77,0x06,0x14,0x77,0xf9,0xbb,0x92,0x9e,0x23,0x22,0xce,0xb7,0x6c,0x9a,0x60,0x37,0x50};
    sm2_fp_from_bytes(a, a48);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a49[32] = {0x8f,0xbf,0x39,0xbe,0x83,0x7b,0xa7,0x9b,0xe1,0x3a,0x24,0x4e,0xa0,0x3e,0xd7,0x25,0x1e,0x6e,0x9c,0x45,0x0f,0xbf,0xce,0xad,0xef,0xd2,0x10,0x21,0x4f,0x43,0xd0,0xfc};
    static std::uint8_t c49[32] = {0xe2,0xb4,0x3a,0xa5,0x93,0x3d,0xc3,0xe3,0xcd,0x59,0x58,0xae,0x9a,0xac,0x41,0x3a,0x40,0x54,0x6f,0x59,0x4e,0xae,0x8c,0x23,0x60,0x77,0x9f,0x02,0x2d,0x16,0x4f,0x09};
    sm2_fp_from_bytes(a, a49);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a50[32] = {0x82,0x4d,0x3f,0x65,0xd1,0x89,0x1b,0x4e,0x9e,0xba,0xa4,0x23,0xdb,0xec,0xec,0x2c,0x56,0xbe,0x0b,0x03,0xc1,0x32,0x2d,0xb4,0xc2,0x79,0x30,0xa1,0xb3,0x3e,0xe9,0x43};
    static std::uint8_t c50[32] = {0x07,0xac,0xac,0x58,0x0c,0x81,0x9c,0x8c,0x07,0xaf,0xd5,0xf8,0x91,0xb8,0x6f,0xb9,0xd7,0xeb,0x88,0x87,0x78,0x9e,0x31,0x48,0x2b,0x25,0x8c,0x4e,0xf1,0x2e,0x98,0x72};
    sm2_fp_from_bytes(a, a50);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a51[32] = {0xe6,0x28,0xdd,0x6a,0x93,0x1b,0x03,0xb0,0x5f,0x09,0xac,0x84,0x31,0x3c,0x52,0xe9,0x72,0xd1,0xdb,0x16,0x10,0x65,0x96,0xd6,0xa4,0x06,0x15,0x56,0x13,0xac,0xf1,0x81};
    static std::uint8_t c51[32] = {0x02,0x5a,0x0f,0x3c,0xaf,0x44,0xb5,0x3d,0x43,0xae,0xce,0x58,0x67,0x2f,0xa7,0x2a,0x50,0x4d,0xc6,0x11,0xe0,0x47,0x61,0x3d,0x52,0xca,0xaf,0xbc,0x41,0x82,0x55,0x61};
    sm2_fp_from_bytes(a, a51);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a52[32] = {0x8b,0x94,0x41,0xb7,0x20,0x1c,0x87,0x07,0x4b,0xd4,0xe7,0x82,0xbf,0xd9,0xa0,0xb4,0xcc,0x25,0xea,0xf8,0x09,0x44,0x63,0x33,0xe2,0x79,0xa7,0x0e,0xf7,0xe6,0xcb,0x7d};
    static std::uint8_t c52[32] = {0x6e,0xbf,0xb7,0x08,0xd0,0x1c,0x1b,0x6a,0xca,0x74,0xa6,0xe9,0x8e,0x4b,0xe3,0x7b,0x81,0x2a,0xc9,0xb2,0xc2,0x20,0xa1,0xff,0x97,0xd8,0xb6,0xa3,0xb9,0x48,0x47,0x74};
    sm2_fp_from_bytes(a, a52);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a53[32] = {0xe1,0x23,0x99,0xcc,0xfc,0x0b,0x95,0x79,0xd2,0xd0,0x21,0x9a,0x1e,0xd4,0xfc,0x7b,0xce,0x04,0x78,0xc9,0xaf,0x12,0x7a,0x61,0x0a,0x12,0x37,0x05,0x7a,0x83,0x3b,0x29};
    static std::uint8_t c53[32] = {0xa2,0xe1,0x67,0x52,0xe5,0xd2,0x05,0x71,0x01,0x0d,0x0a,0x36,0x31,0x1a,0xcd,0xbb,0xb9,0xc4,0x1a,0xec,0x77,0x27,0xf3,0xc0,0x6d,0x62,0x31,0xd1,0x4e,0x23,0xef,0x06};
    sm2_fp_from_bytes(a, a53);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a54[32] = {0x4c,0xa0,0xdf,0xa6,0x69,0xf3,0x17,0xbf,0x49,0xe5,0xda,0xf3,0x7f,0x71,0x88,0x5f,0x37,0x50,0xfb,0x6f,0x17,0x51,0xff,0xcc,0x53,0xaf,0xeb,0x31,0x33,0x39,0x95,0x84};
    static std::uint8_t c54[32] = {0x72,0x34,0xf1,0x3f,0x60,0x59,0x2b,0xcc,0x46,0x50,0x25,0x8e,0x59,0x88,0x7e,0x79,0x00,0x95,0xa4,0x39,0x70,0xc0,0x1e,0x25,0xe8,0x9a,0x0c,0x29,0x29,0x2b,0xfd,0x9f};
    sm2_fp_from_bytes(a, a54);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a55[32] = {0x1b,0x43,0xe5,0xa8,0x32,0xbe,0x09,0x24,0x0e,0x08,0x0d,0xc8,0xec,0x36,0x34,0x0c,0x2e,0x9e,0x25,0x8e,0x6d,0x10,0xff,0x30,0x63,0xf6,0x1d,0x45,0x84,0x4b,0xb2,0xf4};
    static std::uint8_t c55[32] = {0x4a,0xef,0x95,0x00,0xa0,0x2f,0x89,0xb9,0x5e,0xe1,0xeb,0xa3,0x8b,0x28,0x09,0x79,0x0d,0x42,0xe8,0x75,0x2e,0x37,0x84,0x04,0xfe,0xd8,0xe0,0x7b,0xc1,0xcc,0x4c,0xd3};
    sm2_fp_from_bytes(a, a55);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a56[32] = {0x5d,0xf1,0x08,0xa2,0xbd,0x87,0xdc,0x70,0x8c,0xd4,0xde,0xf8,0x8a,0x57,0x3a,0xfd,0x1d,0x02,0x4b,0x5f,0x54,0x2f,0x2b,0x9a,0x51,0x59,0x7f,0x01,0x33,0x6e,0xab,0xed};
    static std::uint8_t c56[32] = {0xab,0xef,0x88,0x6e,0xbc,0xd1,0xc4,0xd0,0x18,0xcf,0xd8,0x69,0xc8,0x98,0x38,0x62,0x94,0x5e,0x77,0xae,0x22,0x73,0xfc,0x1f,0x56,0xbe,0x41,0x9d,0x2f,0xc6,0x31,0x5e};
    sm2_fp_from_bytes(a, a56);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a57[32] = {0xe8,0xbd,0x46,0x1e,0xb4,0x1a,0xe9,0x2b,0x97,0x70,0x65,0xe6,0xd9,0x55,0xd6,0x81,0xf3,0x70,0x3a,0x51,0x1f,0x1d,0x56,0x48,0x80,0x00,0x70,0x05,0xf1,0xad,0xaf,0x2e};
    static std::uint8_t c57[32] = {0x3e,0x9d,0xa0,0xd0,0x7a,0x1d,0x92,0x03,0x8c,0x9c,0x8a,0x15,0xd9,0x75,0xf7,0x20,0x68,0x28,0x7f,0x6c,0x80,0xe0,0x6b,0xc3,0xa5,0x5e,0x84,0x05,0x93,0x8e,0x5c,0x4b};
    sm2_fp_from_bytes(a, a57);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a58[32] = {0x90,0x38,0xb0,0x94,0x67,0x4a,0xb2,0xff,0x42,0x91,0x47,0x79,0x23,0x12,0x19,0x48,0x18,0x0a,0xe1,0x4e,0xa1,0x55,0xc9,0x53,0xec,0x2a,0x32,0x74,0x7a,0x2e,0x5f,0x5f};
    static std::uint8_t c58[32] = {0x8a,0xcf,0x51,0xa5,0x19,0xfe,0x7d,0x70,0x76,0xd2,0x1e,0x5a,0x95,0xc6,0x53,0x93,0xf8,0x82,0x94,0xf3,0x2a,0xaf,0xe0,0x14,0x10,0xa5,0xdc,0xe0,0xc2,0x32,0x25,0x1b};
    sm2_fp_from_bytes(a, a58);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a59[32] = {0xef,0xb4,0x44,0x01,0x09,0xa3,0x33,0x27,0x23,0x9b,0xca,0x83,0x8d,0x22,0x4b,0x0b,0x17,0xeb,0xa0,0x56,0xb2,0xb6,0x48,0xa1,0xc3,0xcf,0x02,0x13,0x1d,0xfb,0xf2,0x29};
    static std::uint8_t c59[32] = {0x17,0x7e,0x4e,0x74,0x2c,0xab,0x9c,0x10,0xb7,0x03,0xb2,0xcc,0xc1,0x59,0x94,0x33,0xbf,0x64,0x59,0x62,0x90,0x1d,0x68,0x3f,0x2b,0x61,0x42,0xc6,0x80,0xdd,0x53,0xfa};
    sm2_fp_from_bytes(a, a59);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a60[32] = {0x05,0xf4,0x00,0x09,0x60,0xf8,0x63,0xbd,0x1a,0x53,0xd3,0xd5,0xfb,0xfb,0x28,0x4d,0xa8,0x20,0x82,0x0b,0x66,0x49,0x3a,0x9c,0x9e,0x6c,0x89,0xa6,0xa2,0x0e,0x3d,0x7e};
    static std::uint8_t c60[32] = {0xfa,0xc2,0xaa,0x8d,0x8b,0xff,0xce,0x0d,0x04,0xd1,0xdb,0x1d,0x4a,0xf3,0x24,0xce,0x2f,0x6a,0xd9,0xb0,0xb6,0x76,0xac,0x07,0x2a,0xd6,0x17,0x80,0x1c,0x1c,0x11,0xfa};
    sm2_fp_from_bytes(a, a60);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a61[32] = {0xac,0x2a,0x5e,0x2c,0x77,0x27,0x28,0xe5,0xae,0xcf,0x31,0xcb,0x90,0x9d,0xe3,0xd7,0x5e,0xce,0x66,0x6c,0x0f,0x23,0xbb,0x76,0x01,0x96,0x5c,0x4f,0x2b,0xda,0xed,0xec};
    static std::uint8_t c61[32] = {0x2e,0x47,0x8d,0x3d,0x66,0x2b,0x79,0x3f,0x53,0xae,0xb5,0x50,0x8e,0x99,0x49,0xeb,0xca,0x93,0xba,0xf0,0x21,0x8c,0x64,0x3b,0x92,0x27,0x9b,0x1f,0xb7,0x4e,0xc1,0x06};
    sm2_fp_from_bytes(a, a61);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a62[32] = {0x33,0x10,0x99,0x9c,0x6b,0x6c,0x16,0xe1,0xeb,0x98,0x3b,0x39,0x60,0x38,0x5f,0x26,0x6c,0x4c,0xb4,0x35,0xc4,0x34,0x7c,0x5d,0xd8,0xb0,0x1b,0xb8,0xad,0x44,0xce,0xf7};
    static std::uint8_t c62[32] = {0xcf,0x8a,0xf0,0xd4,0x0a,0xc7,0x6a,0x5c,0x7b,0xf1,0x7f,0xdf,0xb0,0x82,0x58,0x40,0x71,0x76,0xc9,0x27,0x4b,0xc8,0xc3,0x0a,0x34,0x81,0x65,0xd1,0x9d,0x45,0x02,0xbf};
    sm2_fp_from_bytes(a, a62);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a63[32] = {0xb8,0x80,0x91,0xab,0x7b,0x52,0x7b,0x97,0x13,0x83,0xe0,0x3a,0x22,0x72,0xc9,0x8e,0xc0,0x26,0xd7,0xd1,0xfc,0x0e,0x15,0x62,0xef,0x60,0x78,0x3c,0xe3,0x96,0x7c,0xd7};
    static std::uint8_t c63[32] = {0x37,0xa2,0xc0,0x72,0x98,0x2c,0x29,0x46,0x51,0x88,0x96,0xd9,0xf9,0x83,0x78,0xbe,0xd0,0xca,0x52,0x62,0x0d,0x49,0x90,0x35,0x7c,0x53,0x18,0xc7,0x5b,0x20,0x8e,0x7e};
    sm2_fp_from_bytes(a, a63);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a64[32] = {0x12,0xe9,0x5f,0x41,0x14,0xba,0x06,0x1f,0x97,0x8a,0x3a,0x01,0x8a,0x9e,0xe8,0xd2,0x5a,0x87,0xfb,0x34,0xf8,0x30,0x4f,0xb6,0xe6,0xf2,0x4c,0x4a,0x85,0x5f,0x6f,0x65};
    static std::uint8_t c64[32] = {0xc4,0xc5,0x14,0x98,0x3f,0xb6,0xf6,0xb3,0x82,0xef,0x07,0x0e,0x78,0xe2,0x16,0xa8,0x68,0x18,0x7a,0xf3,0xfe,0x57,0x6a,0xd6,0xef,0xca,0x2d,0xe6,0xd1,0x50,0x26,0x27};
    sm2_fp_from_bytes(a, a64);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a65[32] = {0x50,0x4e,0xc1,0x03,0x71,0xb9,0x67,0x7e,0x29,0xc6,0xb2,0x7c,0x12,0x96,0xf8,0x6b,0xb7,0xb7,0x28,0x71,0x2b,0xb0,0x6f,0x12,0xd9,0x40,0xb6,0x0b,0xce,0x96,0x3c,0x95};
    static std::uint8_t c65[32] = {0x5c,0xc4,0x12,0x60,0xc0,0x05,0x26,0xf7,0xf4,0xe4,0x9e,0x49,0xfa,0x8c,0x0a,0xe7,0xca,0xe4,0xb1,0x88,0x81,0xce,0x52,0x82,0x5a,0x65,0xc7,0x30,0x22,0xc3,0x00,0x9a};
    sm2_fp_from_bytes(a, a65);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a66[32] = {0xf3,0xfc,0xae,0x6c,0x91,0x4a,0x0d,0x5a,0xf2,0x92,0x9a,0xba,0xdd,0x4b,0x63,0x86,0x25,0x66,0x3f,0x3e,0x09,0xa5,0x69,0xe1,0xde,0xe5,0x5d,0x25,0xcc,0x81,0xfd,0x13};
    static std::uint8_t c66[32] = {0xaf,0xd7,0x84,0x10,0x0e,0xa1,0xd1,0xc9,0x0c,0x1f,0x08,0x84,0xfa,0x39,0xca,0x11,0xb2,0x72,0x15,0xc4,0x69,0x5b,0x7a,0x2e,0x68,0x42,0x10,0xb8,0x48,0x8e,0xba,0xb6};
    sm2_fp_from_bytes(a, a66);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a67[32] = {0x2c,0xda,0xd0,0xee,0x6f,0xe8,0xfc,0xbe,0x06,0xad,0xcb,0x70,0xfa,0x5d,0x7e,0xd2,0x1d,0x9e,0xd2,0xef,0x5e,0x01,0x05,0x9e,0x88,0x8d,0x59,0xc2,0x63,0x8f,0x0e,0x40};
    static std::uint8_t c67[32] = {0xf7,0x9e,0xe7,0x15,0xb1,0xab,0xb1,0x8c,0x2d,0xe8,0x00,0x0e,0x3f,0x6f,0x00,0x14,0x2e,0x37,0x96,0x06,0xcb,0xd1,0xe2,0x53,0x86,0xca,0xc4,0x4c,0xb5,0x94,0xab,0xa2};
    sm2_fp_from_bytes(a, a67);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a68[32] = {0xf0,0x8f,0xbf,0xd5,0xd3,0x19,0x04,0xa5,0x8b,0x8b,0x0d,0xf8,0x34,0xba,0x9e,0x90,0x0c,0x91,0xae,0xd0,0x5a,0x41,0xb4,0x4e,0xc8,0x30,0x57,0x8f,0xef,0x96,0x84,0x21};
    static std::uint8_t c68[32] = {0x7f,0xdf,0x36,0x8f,0xa0,0x6d,0xf8,0xa4,0x49,0x88,0x1c,0xfe,0x57,0xab,0xb0,0xcd,0xfb,0x2c,0xe9,0xa7,0xf1,0x45,0x0f,0xfd,0xe2,0xea,0x11,0xf9,0x2f,0x33,0x50,0xb3};
    sm2_fp_from_bytes(a, a68);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a69[32] = {0x23,0xe9,0x74,0xc0,0x9f,0xc4,0xd0,0xd6,0x6b,0x10,0x0a,0x59,0xfe,0x11,0x29,0x5e,0xcd,0xfc,0xb9,0xa3,0x3b,0x83,0x99,0x6d,0x8b,0xe9,0xc0,0x6b,0x4c,0x81,0x6d,0x90};
    static std::uint8_t c69[32] = {0x96,0x3f,0x6f,0xf8,0x9b,0x4b,0x91,0x2f,0x50,0x29,0x4b,0x94,0x47,0x59,0x4e,0xda,0x2a,0x17,0xf2,0xde,0x51,0xf1,0x87,0x25,0x76,0x03,0xef,0xd0,0x08,0x57,0xb6,0xbb};
    sm2_fp_from_bytes(a, a69);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a70[32] = {0x15,0xba,0x1b,0x44,0x43,0xb3,0x36,0xd1,0x6e,0x3a,0xf8,0xb8,0x2f,0x2f,0x7c,0xd5,0xba,0x8a,0xdb,0xcc,0x26,0x55,0x9f,0x50,0x9b,0x89,0x9c,0x76,0xc7,0x32,0x7c,0x9c};
    static std::uint8_t c70[32] = {0x69,0x19,0x31,0x83,0x98,0x5f,0xdc,0x0f,0xb3,0x79,0x53,0xe0,0x1c,0x4d,0x8a,0x13,0x90,0xa1,0xdf,0x6b,0x14,0xa6,0xaa,0x09,0x04,0x64,0xf5,0x16,0x48,0xa3,0xb3,0x35};
    sm2_fp_from_bytes(a, a70);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a71[32] = {0xb3,0xda,0xd1,0x6e,0x2a,0xb1,0x5b,0x4e,0x69,0x70,0x7b,0x43,0xe9,0xcd,0xf7,0x63,0xec,0xd6,0x6d,0x5b,0x79,0x43,0xd4,0xa1,0x79,0x75,0x31,0x0c,0xb6,0x6a,0x41,0xe7};
    static std::uint8_t c71[32] = {0x69,0x1f,0xba,0x77,0xde,0xce,0x18,0xa8,0x89,0x66,0xca,0x48,0x8e,0xc0,0x5b,0xab,0x4f,0x5f,0x2a,0x38,0xa6,0xdd,0xe2,0xeb,0x72,0xf0,0x0f,0x5c,0x94,0x61,0x23,0xd2};
    sm2_fp_from_bytes(a, a71);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a72[32] = {0x31,0x9c,0x67,0x76,0xbf,0x02,0x9a,0xe5,0xd9,0xbf,0xe0,0xac,0xcc,0xee,0xb9,0x3c,0x7e,0xa0,0xf1,0x78,0x23,0xd2,0x1b,0x88,0x39,0xac,0x52,0x17,0xb3,0x0c,0x05,0x89};
    static std::uint8_t c72[32] = {0x35,0xf1,0x58,0xd3,0x95,0xf9,0xe1,0x83,0x51,0x36,0x72,0xe3,0x48,0xa9,0x66,0x6c,0xb7,0x70,0x80,0xf8,0x3d,0x0e,0x52,0xb2,0x74,0xa4,0x03,0x20,0x1d,0xe6,0x04,0xce};
    sm2_fp_from_bytes(a, a72);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a73[32] = {0x1e,0x5a,0x17,0xe8,0xad,0xb4,0x81,0x2b,0xf7,0xe0,0x35,0x04,0x31,0x5e,0xf7,0xed,0x4a,0x9d,0x1d,0xa2,0xa0,0x9e,0x7c,0x7b,0xf0,0xa6,0x60,0x75,0x06,0xa6,0x2d,0xac};
    static std::uint8_t c73[32] = {0xd9,0x20,0xdc,0xc5,0xab,0xc4,0x53,0xcf,0xf1,0x88,0xf6,0x9d,0x23,0x0d,0x4a,0xc3,0x78,0x9f,0x21,0x1e,0x4b,0xe6,0x60,0xa4,0xaf,0xcb,0x16,0x4f,0x2c,0x4a,0x3f,0x26};
    sm2_fp_from_bytes(a, a73);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a74[32] = {0x12,0x7b,0x06,0xf2,0x2e,0x18,0x35,0xe6,0x84,0x31,0xbd,0x0c,0x61,0x04,0x86,0x74,0xfa,0xe1,0x75,0xfd,0xb4,0xba,0x76,0x00,0x10,0x27,0xeb,0xb7,0x57,0x6e,0x3e,0x9c};
    static std::uint8_t c74[32] = {0x1c,0x50,0x4f,0xff,0xd2,0x1e,0x4c,0x7a,0xdb,0x78,0xe6,0xe6,0x91,0x38,0xa1,0x4f,0x9c,0x92,0x45,0x61,0x07,0x60,0x93,0x73,0x0e,0x76,0x8a,0xe0,0x50,0x27,0x72,0x29};
    sm2_fp_from_bytes(a, a74);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a75[32] = {0xea,0xca,0x4b,0x1f,0x35,0x12,0x66,0x50,0x08,0x24,0x89,0xff,0x6d,0x32,0x20,0xfb,0x30,0x1c,0x09,0x80,0xd0,0xba,0x0b,0x99,0xeb,0x99,0x35,0xd7,0x92,0xfa,0xcb,0x31};
    static std::uint8_t c75[32] = {0xcf,0x3c,0xe6,0x7b,0x87,0xe6,0x1d,0xfa,0x50,0x85,0x7d,0x1c,0x2e,0x33,0xe9,0xf1,0xfc,0x92,0x19,0x47,0xf0,0x59,0x08,0x60,0xff,0x55,0xf8,0x08,0xa1,0xeb,0xdf,0x77};
    sm2_fp_from_bytes(a, a75);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a76[32] = {0xb8,0xde,0x2e,0x10,0xd4,0x22,0x52,0x73,0x12,0xc9,0x2d,0xbb,0xc0,0xec,0x55,0xf7,0x1e,0xc9,0xcd,0xca,0x40,0xaf,0x8c,0x46,0xfb,0x9b,0x9c,0xba,0xda,0x57,0xaa,0x5b};
    static std::uint8_t c76[32] = {0xbe,0x5c,0xef,0xda,0xc0,0x8f,0xd8,0xbf,0x97,0xa6,0x60,0xa5,0xd1,0x06,0x85,0x75,0x25,0x37,0xcc,0xb2,0x00,0xdb,0x4f,0xbe,0x57,0xbf,0xf3,0x62,0x53,0x90,0x52,0x6e};
    sm2_fp_from_bytes(a, a76);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a77[32] = {0xd9,0xf2,0x4b,0x1e,0x20,0x53,0x0b,0x8a,0x6c,0xa4,0x1a,0x63,0x74,0xa8,0xd6,0x19,0x48,0x3b,0x7b,0xb1,0xac,0x2a,0x55,0x33,0xa2,0x98,0xa9,0xf0,0x91,0x4f,0xad,0xfa};
    static std::uint8_t c77[32] = {0x04,0xbf,0x6f,0x2b,0xd5,0x2e,0x0a,0xfa,0x14,0x4b,0x04,0x23,0x9b,0x7e,0x87,0x46,0x9e,0x73,0x76,0x66,0xca,0x16,0xb1,0x89,0x8b,0x29,0x77,0x1d,0xe6,0x5a,0xb0,0x85};
    sm2_fp_from_bytes(a, a77);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a78[32] = {0x95,0xf2,0xe8,0x6f,0x3a,0x5e,0x9b,0xa6,0xb8,0xc2,0xef,0x2d,0x61,0xc8,0xb5,0xd2,0x3d,0x46,0x85,0x65,0xaa,0x0c,0x81,0x41,0xcd,0x8c,0xbc,0xe9,0x45,0xbd,0x04,0x30};
    static std::uint8_t c78[32] = {0x29,0x55,0xa9,0x24,0x15,0x89,0x43,0x9c,0x15,0xc7,0x6d,0x93,0xb6,0x53,0xa7,0x3e,0x53,0x13,0x6e,0x87,0xc3,0x52,0x5c,0x45,0x93,0x31,0x2b,0x81,0x98,0x8e,0x1b,0xa0};
    sm2_fp_from_bytes(a, a78);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a79[32] = {0x98,0x5b,0x69,0x97,0xe9,0xd8,0x90,0x89,0x0b,0x37,0xed,0x70,0xd9,0xf0,0x7b,0x61,0xbb,0xce,0x25,0x6c,0x78,0x9e,0x55,0xfb,0xea,0x32,0xef,0x4f,0x4c,0xa0,0xf6,0x2d};
    static std::uint8_t c79[32] = {0x20,0x09,0x67,0x81,0x45,0x66,0xee,0xc7,0xf4,0x1f,0x08,0xbb,0x2d,0xb4,0x91,0xa0,0x06,0x2e,0x49,0xac,0xc8,0x53,0x61,0xe0,0x6a,0x9a,0xc4,0x48,0xc3,0x39,0x20,0xe8};
    sm2_fp_from_bytes(a, a79);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a80[32] = {0x29,0x7e,0xb9,0x4c,0x24,0x57,0x19,0x1a,0x3d,0x34,0x0f,0x0d,0xb4,0x6e,0xd5,0xed,0xb1,0x0d,0x1b,0x13,0xd9,0x0e,0xec,0x84,0xc3,0x6f,0xc2,0x81,0xbc,0xb8,0x31,0x56};
    static std::uint8_t c80[32] = {0x8e,0x53,0x4b,0xbd,0xc6,0xfc,0x22,0x55,0x23,0xdf,0xae,0x23,0xff,0xde,0xaf,0x9a,0xcf,0xc1,0x70,0xc0,0xfa,0x56,0x34,0x8b,0x39,0xe2,0x04,0xa5,0xef,0x1f,0xc7,0x30};
    sm2_fp_from_bytes(a, a80);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a81[32] = {0xc2,0xf8,0xe4,0x7f,0xd2,0x9d,0xcf,0xa0,0x78,0xd3,0xdd,0x7e,0xa4,0xe1,0xda,0xbb,0xc0,0xa7,0xb6,0x9c,0x43,0x6c,0x70,0x85,0x56,0x7d,0xaa,0x45,0x1a,0xdb,0xb0,0xc8};
    static std::uint8_t c81[32] = {0x77,0xcd,0x9d,0x7c,0x7d,0xf6,0xc7,0x1e,0x79,0x87,0xac,0x0b,0x22,0x3f,0x22,0xbd,0x88,0x44,0xf8,0x01,0x79,0x82,0x38,0x14,0xca,0x3c,0x31,0xc1,0x33,0x8f,0x2c,0x7a};
    sm2_fp_from_bytes(a, a81);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a82[32] = {0xa7,0xf5,0x14,0xc4,0xfe,0x95,0xd9,0x77,0xda,0xfe,0x9a,0xc7,0x38,0x73,0x86,0xfe,0x64,0xdc,0xa0,0xe9,0xed,0xdd,0xf6,0xed,0xd0,0x72,0x60,0xa5,0x26,0xb4,0x88,0x68};
    static std::uint8_t c82[32] = {0x8d,0x1f,0xaf,0x84,0x7c,0x8f,0x06,0xd1,0x36,0x50,0x01,0x69,0xbc,0x3a,0xf5,0xe1,0x15,0x0f,0x39,0x3b,0xee,0x52,0xe6,0x18,0x4c,0xe5,0x80,0x33,0x2b,0xc7,0x4f,0x1e};
    sm2_fp_from_bytes(a, a82);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a83[32] = {0x97,0xae,0x93,0x70,0x9d,0xac,0xf7,0x3e,0xc2,0x50,0xcc,0x7d,0xe5,0x2f,0x26,0x7f,0x5f,0xf1,0x54,0xbf,0xbe,0xc5,0x1e,0x30,0x85,0xdf,0xd8,0x7e,0xad,0x60,0x65,0x65};
    static std::uint8_t c83[32] = {0x80,0x31,0x66,0xc4,0x24,0xc6,0xe2,0x2a,0x4d,0x80,0x95,0x19,0xfc,0xfb,0x35,0xd4,0x2a,0xc9,0x32,0xdf,0xdb,0xe6,0xb0,0xd6,0x0b,0xb6,0xd1,0xf0,0xa0,0x30,0xff,0x05};
    sm2_fp_from_bytes(a, a83);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a84[32] = {0xf4,0x83,0xe3,0x62,0x66,0x90,0x59,0xd3,0xb0,0xee,0x86,0xce,0x16,0xaf,0xf4,0xc4,0x7a,0x6c,0xc1,0xd5,0x7b,0x9b,0x95,0x3e,0xcc,0xed,0xfb,0x0e,0xd5,0x99,0x7f,0xcd};
    static std::uint8_t c84[32] = {0x58,0xd0,0x50,0xb4,0x27,0x81,0x37,0xdc,0xcb,0xbb,0x17,0x1b,0x6a,0x27,0x22,0xe6,0x99,0x56,0xf1,0xd5,0x87,0x7e,0xb4,0x34,0x9d,0xf7,0x1a,0xe9,0x20,0x15,0x38,0xeb};
    sm2_fp_from_bytes(a, a84);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a85[32] = {0xcb,0x1a,0xbc,0x0d,0x79,0xee,0x91,0xa5,0xcf,0xb8,0x56,0xf4,0x18,0xe2,0x68,0xd8,0xa2,0x70,0x9f,0xde,0x31,0x06,0xf4,0x55,0xb6,0x19,0xe7,0x97,0xe6,0xba,0x27,0xd9};
    static std::uint8_t c85[32] = {0x9b,0xeb,0x2d,0x69,0xb8,0x31,0x5a,0x49,0xa4,0xf8,0xe8,0x97,0x6f,0x62,0xef,0x3c,0x8b,0x87,0x95,0x02,0xcd,0xf8,0xac,0x17,0x55,0x6f,0xe8,0x4c,0x23,0x0f,0xf1,0xda};
    sm2_fp_from_bytes(a, a85);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a86[32] = {0x70,0x41,0xd9,0x7a,0x7b,0xf1,0x86,0x1a,0xf1,0xc1,0xfc,0x64,0xc8,0x5e,0x64,0xd7,0xc2,0xfb,0xf4,0xeb,0x6c,0xc8,0x12,0x40,0xa4,0x33,0x0c,0x37,0xc3,0x3f,0xb0,0xa2};
    static std::uint8_t c86[32] = {0x06,0x0a,0x2d,0xd3,0xdd,0xa5,0xb8,0x53,0x13,0x9c,0xe2,0x6f,0x25,0x88,0xf3,0x23,0xce,0x4e,0xf9,0x5d,0xc6,0x84,0xc6,0x40,0xa8,0x1f,0x6f,0x09,0x37,0xfa,0x14,0x41};
    sm2_fp_from_bytes(a, a86);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a87[32] = {0xe3,0xe0,0x2c,0xde,0x3c,0x8a,0x90,0x7d,0x96,0x9b,0xe9,0xbf,0x6b,0x1b,0x3d,0x36,0x3e,0xdf,0xcf,0x74,0x42,0x88,0x65,0x0d,0x51,0xde,0x06,0xbb,0xdf,0xf8,0xaa,0xab};
    static std::uint8_t c87[32] = {0xdd,0xfb,0x8f,0x62,0x92,0xb8,0x2b,0x2c,0x91,0x44,0x57,0x5e,0x02,0xa1,0x66,0xdb,0xc1,0xf5,0x05,0x79,0x24,0xc0,0xc3,0xcc,0x60,0x90,0x44,0x67,0x24,0xba,0xd6,0x53};
    sm2_fp_from_bytes(a, a87);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a88[32] = {0x70,0x77,0xa3,0x4a,0x02,0x5a,0xbc,0x74,0x7e,0x4e,0x75,0x06,0xb7,0x9f,0xd0,0x18,0x40,0x32,0xe8,0xd0,0x1e,0xbe,0x49,0xe5,0x79,0x7f,0x0e,0x9a,0xf6,0xb9,0x57,0x26};
    static std::uint8_t c88[32] = {0x49,0x0b,0xab,0x4d,0xbd,0xdd,0x70,0x10,0x15,0xbf,0x9e,0x7a,0x64,0x1b,0x0b,0x57,0x73,0x85,0x61,0xf0,0x7d,0xb3,0x5d,0xc6,0x05,0x33,0xeb,0x26,0xc0,0x48,0x0c,0xb9};
    sm2_fp_from_bytes(a, a88);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a89[32] = {0x0b,0x19,0xfe,0xda,0x47,0x8e,0xf6,0x88,0x73,0xac,0x9e,0xf7,0xbc,0x15,0xf4,0xad,0xa7,0x8b,0xd0,0x20,0x24,0x7e,0x34,0xc0,0x67,0xfe,0xe0,0x75,0x0a,0x49,0x66,0x3e};
    static std::uint8_t c89[32] = {0xcb,0x33,0x0d,0x39,0x21,0xe4,0x35,0x51,0xed,0x40,0xe8,0xb6,0x8d,0x2e,0x7b,0x34,0xb0,0xa0,0xc0,0xaf,0x18,0x6c,0x9d,0xa2,0x62,0x9c,0xaa,0x9a,0xc3,0xd9,0x31,0x06};
    sm2_fp_from_bytes(a, a89);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a90[32] = {0x5c,0x77,0xb2,0xe5,0xc3,0xd5,0xf3,0xa4,0xc2,0xb9,0x86,0xcc,0x33,0x87,0xd7,0x5f,0x96,0xba,0x43,0x3b,0xde,0x5a,0xfd,0x3a,0x95,0x0b,0x5d,0xfd,0xc8,0x7b,0xb0,0xa6};
    static std::uint8_t c90[32] = {0x20,0xc0,0xfd,0xf9,0x6b,0x3f,0x91,0x1e,0x85,0x59,0x3e,0x01,0x85,0xec,0xfd,0xab,0xf1,0xe4,0x86,0x43,0xe1,0x6f,0x60,0x9c,0x6d,0x86,0x46,0x4f,0xe1,0x25,0x9c,0x9b};
    sm2_fp_from_bytes(a, a90);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a91[32] = {0x12,0xfa,0xcd,0xd4,0x32,0xd6,0x23,0x10,0x6e,0xd0,0x08,0x23,0x06,0xed,0x97,0x9e,0x80,0xcd,0x5a,0xa9,0xcf,0x40,0x3d,0x1a,0x62,0xe3,0x5e,0x20,0xe2,0x6f,0x1a,0x36};
    static std::uint8_t c91[32] = {0xdc,0x27,0xba,0xc1,0xf0,0x58,0x69,0x69,0xd6,0x21,0x76,0xf5,0x58,0xb1,0x44,0x12,0x2c,0xc5,0x53,0x82,0x03,0x60,0x85,0x33,0x6a,0x29,0x82,0xc9,0xd1,0xe8,0x16,0x03};
    sm2_fp_from_bytes(a, a91);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a92[32] = {0xd5,0x00,0xb8,0x40,0xf0,0x76,0xcb,0x3a,0x37,0x35,0xb1,0x58,0x07,0xfa,0xd3,0x66,0x4a,0xd9,0x62,0xd0,0x7f,0x41,0x1f,0x1f,0x91,0x7a,0x07,0x52,0x48,0xa5,0xd2,0xdd};
    static std::uint8_t c92[32] = {0x50,0x55,0x72,0x64,0x48,0x10,0xdb,0xcd,0x5f,0x83,0x46,0x17,0x22,0xff,0xdd,0xe5,0x09,0xce,0xe1,0x08,0xad,0x75,0x09,0xe1,0xc7,0xa5,0xfe,0xc4,0xb3,0xe3,0x67,0xaf};
    sm2_fp_from_bytes(a, a92);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a93[32] = {0x4d,0x4f,0xea,0xc7,0x4b,0xc9,0x2f,0x6e,0xb3,0x0b,0xcc,0xdd,0xb2,0xf9,0x1f,0x7e,0xeb,0xf1,0x14,0xad,0x97,0xc0,0x56,0x23,0xd5,0x7d,0xbf,0xef,0xb8,0xad,0x79,0x39};
    static std::uint8_t c93[32] = {0xa2,0x64,0xc6,0xe6,0xb3,0xdf,0x69,0xe3,0x5e,0x47,0x2b,0x81,0xf5,0xd4,0x42,0x63,0x85,0x9e,0x77,0x10,0x79,0x5e,0x8f,0x7a,0x31,0x35,0x4f,0xdf,0x4f,0xac,0x7d,0xdf};
    sm2_fp_from_bytes(a, a93);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a94[32] = {0xb6,0xca,0xc2,0xff,0x68,0x75,0xf4,0x69,0xe3,0xf9,0xa9,0x18,0x00,0x50,0x1c,0xe5,0xc8,0x46,0x93,0xea,0x0d,0x77,0x63,0xf9,0xc5,0xe1,0x03,0xf3,0x2e,0x37,0xdd,0x17};
    static std::uint8_t c94[32] = {0x6f,0xc3,0x82,0xff,0xc2,0x96,0xa3,0x4c,0xb6,0x09,0x78,0x98,0x71,0x8d,0x8e,0x7c,0xda,0x33,0x57,0xb5,0x58,0x0d,0xb7,0xe8,0x4a,0xe3,0xf2,0x53,0x97,0x70,0x94,0xe7};
    sm2_fp_from_bytes(a, a94);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a95[32] = {0x48,0xcd,0x77,0xeb,0xad,0x79,0x5c,0x7e,0x5c,0x62,0x57,0x4f,0xa6,0x5e,0x89,0xc2,0x2c,0x30,0x0f,0x1a,0xe0,0x1c,0x45,0xac,0x8d,0x70,0x4f,0x34,0xcf,0x33,0x4f,0x1b};
    static std::uint8_t c95[32] = {0x04,0xc2,0xcf,0xd0,0xfa,0x19,0x10,0xcd,0x91,0xda,0x72,0xbc,0x80,0xd7,0xa7,0x6d,0x39,0x65,0x7c,0x9a,0xe3,0x4d,0x58,0x06,0x71,0xa7,0x74,0xf4,0xfe,0xeb,0x8d,0x2e};
    sm2_fp_from_bytes(a, a95);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a96[32] = {0x8a,0xef,0x25,0x37,0x76,0x10,0xcc,0x54,0xcf,0x4a,0x62,0xb2,0x1f,0xee,0x19,0x50,0x3e,0xeb,0x00,0xa6,0xc7,0x9b,0x8d,0xca,0x5b,0x58,0x62,0xe4,0x5a,0xc9,0x9b,0xa3};
    static std::uint8_t c96[32] = {0x58,0xa4,0x5d,0xcc,0x4d,0xf0,0x05,0x05,0xb2,0xb8,0x1b,0x33,0xaa,0x50,0xcb,0xed,0xf3,0x98,0xd6,0x9b,0xd4,0x10,0xb2,0x0a,0xe4,0xd8,0x60,0xf3,0x86,0x56,0x56,0x87};
    sm2_fp_from_bytes(a, a96);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a97[32] = {0xe3,0xaa,0x66,0xba,0xa7,0x38,0x59,0x9f,0x94,0x73,0x26,0x66,0xc2,0xcd,0x7c,0xbd,0xe8,0x29,0xae,0x58,0x96,0xc1,0xcf,0x1f,0x6f,0x53,0x62,0x84,0x0a,0xfc,0xd3,0xb3};
    static std::uint8_t c97[32] = {0x7e,0x0d,0xd7,0x1c,0xf0,0x53,0xc7,0x69,0x0c,0x81,0x46,0x79,0xc2,0xcb,0xe6,0xd7,0x4e,0x15,0x3c,0xca,0xa8,0xc7,0x94,0xce,0x27,0x2e,0x47,0x11,0xbb,0xd1,0x90,0xee};
    sm2_fp_from_bytes(a, a97);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a98[32] = {0xb0,0x4f,0x7c,0x82,0x4a,0xc1,0x6f,0x2e,0xc4,0x2b,0x86,0x18,0xa8,0xaf,0x03,0x8d,0x28,0x43,0xf6,0x5d,0x7a,0xb3,0xda,0x9f,0x81,0xd3,0x44,0x20,0xe6,0x13,0xa4,0x90};
    static std::uint8_t c98[32] = {0xc4,0x15,0x6d,0x3d,0x9a,0xb4,0xb0,0x76,0x30,0x82,0x18,0x0c,0x17,0x3b,0x8b,0x78,0xca,0xc0,0xac,0x08,0xa4,0x77,0x75,0x52,0xbf,0xb0,0xe3,0xbe,0x5a,0xf0,0xc8,0x24};
    sm2_fp_from_bytes(a, a98);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }

    static std::uint8_t a99[32] = {0x8e,0x44,0xe6,0x49,0x23,0xa7,0x0e,0xbb,0xc9,0x8a,0xd1,0x8a,0xc4,0x89,0x77,0xfb,0xd8,0x2e,0x36,0x48,0xee,0x45,0x15,0xb5,0x71,0xde,0x56,0x10,0x97,0x54,0xc8,0x7e};
    static std::uint8_t c99[32] = {0x17,0x80,0x70,0x2e,0xcc,0x35,0xce,0xcd,0x90,0xaa,0xb3,0x5b,0x98,0x7d,0x8b,0xec,0x5a,0x7a,0x39,0x45,0xfb,0x56,0x4b,0x1b,0x19,0x51,0x64,0xca,0xad,0x4d,0xaf,0xae};
    sm2_fp_from_bytes(a, a99);
    sm2_fp_inv(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_inv");
    }
}